package com.qf.service.impl;

import com.qf.dao.BookDao;
import com.qf.entity.Bookxx;
import com.qf.service.BookService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 *
 * @author 阿亘
 * @date 2023/07/14
 */
@Service("bookService")
public class BookServiceImpl implements BookService {
    @Resource
    private BookDao bookDao;

    @Override
    public List<Bookxx> listBooks() {
        return bookDao.listBooks();
    }

    @Override
    public Bookxx findBookByName(String bookname) {
        return bookDao.findBookByName(bookname);
    }

    @Override
    public int addBook(Bookxx book) {
        return bookDao.addBook(book);
    }

    @Override
    public int deleteBool(Integer bookid) {
        return bookDao.deleteBool(bookid);
    }

    @Override
    public int updateBook(Bookxx book) {
        return bookDao.updateBook(book);
    }

    @Override
    public int borrowBook(Integer bookid) {
        return bookDao.borrowBook(bookid);
    }

    @Override
    public int returnBook(Integer bookid) {
        return bookDao.returnBook(bookid);
    }
}
